<?php
	$setting_for_fun = 0; // 0:off , 1:on
	
	$uri = $_SERVER['REQUEST_URI'];
	$uri_var = explode('/', $uri);
	
	$count = count($uri_var);
	if(substr($uri,-1,1) == "/")
	{
		$count = $count-2;
	}
	else
	{
		$count = $count-1;
	}
	
	for( $i = 0; $i <= $count; $i++ )
	{
		$var_name[] = "uri_" . $i;
	}
	
	for( $i = 0; $i < $count+1; $i++ )
	{
		${$var_name[$i]}  = $uri_var[$i];
	}
?>	
	<div style="overflow: hidden;">
		<div style="display: table; vertical-align:middle; width:100%; #position: relative; overflow: hidden; ">
			<div style=" #position: absolute; #top: 50%;display: table-cell; vertical-align: middle; width:100%; ">
				<div style=" #position: relative; #top: -50%; text-align:center;">
					<div style="width:500px; margin:0 auto; padding-top:50px; ">
						<?php
							if($setting_for_fun==1)	// for fun image :)
							{
						?>
						<div style="background-color:#ffffff; border:solid 1px black;">
							<div style="width:250px; height:254px; background:url('<?php echo getURLdomain(); ?>/source/global/img/9gag-meme/9gag_meme_y-u-no-guy.jpg') no-repeat; float:left;"></div>
							<div style="float:left; padding-top:150px;"><span style="font-weight:bold; font-size:20px; padding-left:20px;">Y U NO EXIST ?!?</span></div>
							<div style="clear:both;"></div>
						</div>
						<div style="clear:both;"></div>
						<?php
							}
						?>
						<div style="border:solid 1px black; width:498px; background-color:#ffffff;">
							<div style=" text-align:center; width:100%; padding:10px 0 10px 0;">
								Oooppss... We're sorry... the page that you requested is not exist.
							</div>
							<div style=" text-align:center; width:200px; margin:0 auto; padding:5px 0 5px 0;">
								<?php
									if(isset($_SERVER['HTTP_REFERER']))
									{
								?>
									<div style="float:left;">
										<a target="_self" href="<?php echo $_SERVER['HTTP_REFERER']; ?>">Back to previous Page</a>
										<!--<form action="<?php echo $_SERVER['HTTP_REFERER']; ?>">
											<input type="submit" value="Go Back">
										</form>-->
									</div>
									<div style="float:left;">
								<?php
									}
									
									if($uri_1 == "mvz-admin")
									{
								?>
										<a class="link-button" target="_self" href="/mvz-admin/">Back to Homepage</a>
										<!--<form action="/mvz-admin/">
											<input type="submit" value="Go Home">
										</form>-->
								<?php
									}
									else
									{
								?>
										<a class="link-button" target="_self" href="/">Back to Homepage</a>
										<!--<form action="/">
											<input type="submit" value="Go Home">
										</form>-->
								<?php
									}
								?>
									</div>
									<div class="clear" style="clear:both;"></div>
							</div>
						</div>
						<div style="clear:both;"></div>
					</div>
				</div>
			</div>
		</div>
	</div>
